<?php
/**
 * Created by JetBrains PhpStorm.
 * User: pete
 * Date: 10/31/13
 * Time: 9:17 PM
 * To change this template use File | Settings | File Templates.
 */

class Faculty_Department_Model extends CI_Model {
    //exp_fmis_department


    public function __construct(){
        parent::__construct();
    }

    public function getAll()
    {
        $sql = "SELECT * FROM exp_fmis_department";
        $query =  $this->db->query($sql);
        $result = $query->result_array();
        return $result;
    }

    public function getById($id = 0)
    {
        $sql = "SELECT * FROM exp_fmis_department WHERE DeptID LIKE ?";
        $query =  $this->db->query($sql, $id);
        $result = $query->row_array();
        return $result;
    }

}

?>